<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class User_id {
        
    function id() {
        $CI =& get_instance();
        $session_data = $CI->session->userdata('logged_in');
        return $session_data['id'];
    }

    function cek() {
        $CI =& get_instance();
        $CI->load->model('user');
        $level = $CI->user->cek($this->id());
        if ($level) {
            $level;
        } else {
            $level = 0;
        }
        return $level;
    }

}

?>
